package com.meals.system.dao;

import com.meals.system.entity.SystemSellerCategory;
import com.meals.system.util.PageQueryUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Description:
 * Parm:
 * return:
 * Author: Chen
 * Date: 2021/12/10
 */
@Mapper
public interface SellerCategoryMapper {

    SystemSellerCategory selectByPrimaryKey(Long categoryId);

    SystemSellerCategory selectByLevelAndName(@Param("categoryLevel") Byte categoryLevel, @Param("categoryName") String categoryName);

    int getTotalSellerCategories(PageQueryUtil pageUtil);

    List<SystemSellerCategory> findSellerCategoryList(PageQueryUtil pageUtil);

    List<SystemSellerCategory> selectByLevelAndParentIdsAndNumber(@Param("parentIds") List<Long> parentIds, @Param("categoryLevel") int categoryLevel, @Param("number") int number);

    int insert(SystemSellerCategory record);

    int insertSelective(SystemSellerCategory record);

    int deleteByPrimaryKey(Long categoryId);

    int deleteBatch(Long[] ids);

    int updateByPrimaryKey(SystemSellerCategory record);

    int updateByPrimaryKeySelective(SystemSellerCategory record);


}
